When nuts come into the house, I divide "my" share of them into serving-size portions, and put each serving into a separate sandwich bag. Then I put all of my sandwich bags into a large zipper bag with my name on it. And then I put that away in the cupboard.
When I crave nuts, I will get out one of the servings and eat that. One serving is more nuts than you might think (for instance, an ounce of almonds is 23 nuts), so it's satisfying. And by limiting the amount I eat with this simple strategy, I don't find myself just eating out of the can or bag or whatever and not keeping track.
Yes, it uses a lot of sandwich bags, but they are reusable for this purpose, and my main goal is to keep myself on track by whatever method works.