(CNN) Russian government-linked hackers potentially targeted as many as 21 states' election systems last year, a Homeland Security official warned Congress on Wednesday.

None of those systems were involved in vote counting, however.

DHS' acting Director of Cyber Division of the department's Office of Intelligence and Analysis, Samuel Liles, said that by late September the intelligence community concluded that 21 states "were potentially targeted by Russian government-linked cyber actors" with scanning of Internet-connected election systems. Liles did not specify which 21 states he was referring to.

The comments came during a hearing of DHS and FBI cybersecurity officials before the Senate intelligence committee.

Liles said of the 21, a small number were attempted for an intrusion unsuccessfully, "as if someone rattled the door knob and was unable to get in," and in a small number "they made it through the door."

Read More