support for count, moving into templating now