Let's say I have a schema, representing Question entities. Each question can be voted up, voted down or, of course, not voted at all - just like here in StackOverflow. I want to get the number of voteups for a given user.
int number = (from q in userDbContext.Questions
from qv in q.QuestionVotes
You can use
userDbContext.Questions.SelectMany(x => x.QuestionVotes).Count(x => x.IsVoteUp);