Minor simplification of wrapFunction. Added more tests for wrapFunction. Added a countPoints function to Scattergraph.