I am lost regarding if non-parametric tests can be used for discrete data (specifically, counts). Moreover, there are a lot of ties in the data (it's an activity data frame, where the entrances and exits of birds in nests were counted periodically).

Count data outcomes can be handled by appropriate generalized linear models, Poisson or negative binomial, usually with a log link. They model the many ties expected with count data. They can adjust for other variables in your data by using them as predictors (which need not be normally distributed) in the model. Such models would also handle different observation durations among birds/nests, with offset terms representing the duration of observation (log(duration) with a log link). Such a model of counts could be the best approach, providing a direct comparison of the mean number of entrances/exits per unit time between your groups.

Can I use a Kruskal-Wallis test to check the difference in the means of the two groups?

As comments on the question and another answer indicate, the KW test does not test differences in means and might not be a very good test of median differences (even if the necessary assumption of distributions that only differ in location, not shape or scale, is met). Furthermore, a KW test does not allow you to adjust for other covariates, which you seem to have in your two continuous variables.

As Frank Harrell points out, ordinal regression is designed for discrete ordered outcomes. It also allows adjustment for covariates. It would test something other than the difference in means, however: it tests whether the odds of having a higher number of entrances/exits differs between the groups.