counting indegree and outdegree using jsp..