added support for count. Still need to figure out how to test it better.