#include using namespace std; #define rep(i, n) for( ll i = 0; i < n; i++ ) using ll = long long; int main() { int N; cin >> N; int ans = 0; rep(i, N) { int a, b; cin >> a >> b; if(a > b) continue; ans++; } cout << ans << endl; }