Adds basic counting functionality.