Implement simple counting

Signed-off-by: Frca <killerfrca@gmail.com>