a=Import["/home/i/tmp/libfsm/1/test","Lines"];

readbinarystring[x_]:=FromDigits[x,2]

Tally[Map[Mod[readbinarystring[#],3]&,a]]