Added getAdapter and getCount methods