How many calories can I eat and still lose weight?

It depends. Focusing on calories is not the only requirement for weight loss. Foods have other characteristics that contribute to weight gain. Processed foods cause more weight gain than non-processed foods even when calories are equivalent because they are stored as glycogen which contains more water. This may explain the extra weight gain after a "rich" meal.
Bmr. Need your baseline metabolic rate (BMR) then you either eat 200-300 calories lower than your BMR or add activity that would equal 200-300 calories to keep your same diet pattern.