modified the script to count functional annotations