added count and type commands