public static int getCount ( Context context , Uri uri ) { String [ ] proj = { "COUNT(*)" } ; return Cursors . firstInt ( context . getContentResolver ( ) . query ( uri , proj , null , null , null ) ) ; }
Get the number of rows at the URI .