The point of a ketogenic diet is to reduce chronically elevated insulin levels by restricting carbohydrate intake (we recommend an upper limit of 20 grams/day). The reason is that carbohydrate is reduced to its component glucose molecules in the digestive tract, which are then absorbed and stimulate insulin secretion.
Protein has a much lesser effect on insulin, especially when carbohydrate intake is greatly reduced. Fat has only a minimal effect on insulin (the minimum necessary to sustain life; insulin is essential to our health when kept at the proper level), so it becomes the logical source of calories to replace the calories lost from no longer eating carbohydrate. Therefore you need not worry about the amount of fat you eat, as long as you are keeping your carbohydrate intake as low as possible. You also need not worry about calories, because lowering insulin makes our appetite a reliable guide to how much to eat. Just eat when hungry and stop eating when your hunger is satisfied.
Some cheeses still contain milk sugars, so be sure to check the labels. The cheeses with the least amount of carbohydrate tend to be the ones that have been aged the longest. Walnuts, macadamia nuts, and almonds are not too bad in terms of carb content, but don’t overdo them. Fruits should be avoided, except for berries. Peanuts and other legumes should be avoided. Stick to leafy green vegetables and cruciferous vegetables, such as broccoli and cauliflower. Their high fibre content lessens the impact of the carbohydrate they contain.
As for what fats to eat, cook with butter/ghee, tallow, lard, and bacon grease. Saturated and monounsaturated fats are the healthiest (contrary to the dietary advice handed out for the last forty years). Avoid seed oils (soy, safflower, canola, peanut, cottonseed, sunflower, etc.), because they are high in inflammatory ω-6 fatty acids. Yes, they are essential to our diet, but in quantity they are not helpful. The best oils are the fruit oils (avocado, coconut, and olive), which make delicious salad dressings and mayonnaise.