Add block functionality to Mapper#count