What command to read an encoder

I'm lost right now. I have a rotary encoder but I'm unable to find the command to make a reading from the encoder and make Arduino keep that reading. Can anyone help me with this? Where can I find a good an uncomplicated source for encoders in Arduinos. I googled that but I couldn't find anything for beginers.

Thanx

Nice try!!! But, as I told you, I googled that before. It's my first time facing an encoder and I don't know how to face the task.

Do you want to count encoder pulses for angle/rotation speed calculation or are you using a rotary encoder as up/down input buttons? I have some uncomplicated code to do the input buttons.