What does the 'F' button and '2' button do (materials tab)?
Some Theory

To understand how these buttons work, you first need to understand the concept of datablocks and users.

Everything in Blender is a datablock. An object is a datablock. A material is a datablock. A particle system is a datablock.

A user in blender, is something that uses a datablock. If you have a material, and you apply it to an object, that object's datablock becomes a user of that material. If you have a particle system applied to an object, that object's datablock becomes a user of it.

A datablock can have an infinite number of users. For example, there is no limit to how many times a material or a particle system can be applied to another object. 

Blenders Garbage Disposal System

Before we can actually get into what this button does, I need to explain Blenders garbage disposal system.

Blender has a really neat, but somewhat annoying method of getting rid of datablocks. 

Blender never deletes datablocks unless they have not users, and then, only when it's closed. So if you have a material that not objects use, and you close Blender, you lose that material.

The Fake User Button "F"

The way to stop this from happening is to use the "F" Button. The "F" stands for Fake User. This is exactly what it sounds like. It creates a fake user, so that the datablock always has at least one user, and doesn't get deleted by Blender when Blender is closed.

The "Number" Button

This also ties in with the whole idea of users. Basically, this displays the number of users this datablock has. If you click on it, it simply creates a duplicate of it, with 1 user (the datablock it's applied to).