MAINT: Add a 'count_nonzero' function to use with numpy 1.5.1, and use it in stats.median_test