Calorie count daily

How do you count your daily calories and stay on calorie deficit? Share all tips and tricks! I am tired of trying to loose weight and being stuck. Nothing worked and kept the weight off.