basic dependency counting