-generating pairs and counting