I've run a geoprocessing SelectLayerBylocation on 2 layers. One has a few features. The other has millions (the layer to be selected). This runs quickly. But then I'm trying to figure out how many resultant records there are. That seems to hang. I've tried
rtnNum = gp.GetCount_management(freewayLayer)
which is maybe still buggy in 9.3?? (but does it work in 10?)
I've tried a basic search cursor. In 99.99% of my cases, The selection layer will have 0 results. So I think its trying to deal with ALL of the records if the selection layer has 0 features selected.
I've tried gp.tableselect(freewayLayer, tempFile) but this is also rediculously slow. I was thinking this would ONLY work on the selected features but now I'm not so sure.
Ideas? I ONLY need to know how many intersected features there are?