corrected state and transition counts in directed graph