Pseudo code for CTR mode encryption I am following a document here about CTR mode of encryption. I have some point uncleared.
At the part 1 Review of Counter-Mode Encryption.
Operation.


  To encrypt using CTR-mode encryption, one starts with a plaintext  M
  (an arbitrary bit string), a key K, and a counter ctr , where ctr is
  an n-bit string.  Let C be the XOR (excusive-or) of M and the first
  |M| bits of the pad  EK(ctr) || EK(ctr+1) || EK(ctr+2)... The
  ciphertext is(ctr,C), or more generally, C together with something 
  adequate to recover ctr. 
  
  To decrypt ciphertext (ctr;C) compute the plaintext M as the XOR  of C
  and the first |C| bits of the pad  EK(ctr) || EK(ctr+1) ||
  EK(ctr+2)...
  
  Therefore, decryption is the same as encryption with M and C
  interchanged


As I think, the pseudo code will be:

selectFirst(pad, plainText M){
    int n = length(M);
    return n first element of pad
    return firstElements(pad, n);
}

void ctr(){
    string M;
    key[16] K;
    n-bit-string ctr;
    pad = EK(ctr) || EK(ctr+1) || EK(ctr+2)...
    firstM = selectFirst(pad, M);
    C = xor(M, firstM);
}


EK (x) is encrypt x (using some algorithm such as AES) with key K.
But I don't understand:


  
  what is ctr + 1, ctr+2...?
  Is EK(ctr) || EK(ctr+1) || EK(ctr+2)... an 'OR' operation? and what is its result?
  Is CTR mode one-time execution and not using loop?
what is ctr + 1, ctr+2...?


ctr is the first 128-bit input value processed by the block cipher, ctr+1 is this number incremented by 1, and so forth. In practice, ctr is generally a combination of a 96-bit nonce and a 32-bit incrementing counter.


  Is EK(ctr) || EK(ctr+1) || EK(ctr+2)... an 'OR' operation? and what is its result?


No, || refers to concatenation in this example.


  Is CTR mode one-time execution and not using loop?


No, CTR mode implementations almost always use a loop, and process in increments of a multiple of the block size.