code for counting possible proteins