Added some basic count functionality.