counting external resources