Question: Say I just create directory newDirectory and then I do ls -ld command. I see that the number of hard links is 2. What exactly makes the hard link 2 from the start? Also is the number of subdirectories in the current directory equal to the number of hard links - 2?

Answer: 
There's one for the directory itself, and one for `.` inside it.

> 
> Also is the number of subdirectories in the current directory equal to the number of hard links - 2?
> 
> 
> 

That makes sense, since each subdirectory creates a `..` hardlink, and beyond that you can't create hardlinks to directories.1 However, I would't trust this for anything serious, esp. since it is easy to count the subdirectories and get the real number. 

If you are just looking at `ls` output for an idea of how many subs there are, then it does give you a decent idea.

1 Or at least, you can't with `ln`. I have not tried to programmatically, and `man 2 link` is ambiguous -- there's no obvious error for linking to a directory, although there are a couple that might apply (`EMLINK`, `EPERM`). So unless there's some standard somewhere that says the only possible hard links to a directory are `.` and `..`, again, I would only treat that hard link count as a casual clue.
This depends on the filesystem. BTRFS breaks with this convention.

```none
# dd if=/dev/zero of=btrfs.img bs=114294784 count=1
1+0 records in
1+0 records out
114294784 bytes (114 MB, 109 MiB) copied, 0.172979 s, 661 MB/s

```

```none
# mkfs.btrfs btrfs.img 
btrfs-progs v4.20.1 
See http://btrfs.wiki.kernel.org for more information.

Label:              (null)
UUID:               ad5f6c58-ec7a-41db-9d19-ec98db96d725
Node size:          16384
Sector size:        4096
Filesystem size:    109.00MiB
Block group profiles:
  Data:             single            8.00MiB
  Metadata:         DUP              32.00MiB
  System:           DUP               8.00MiB
SSD detected:       no
Incompat features:  extref, skinny-metadata
Number of devices:  1
Devices:
   ID        SIZE  PATH
    1   109.00MiB  btrfs.img

```

```none
# mount btrfs.img /mnt

```

```none
# mkdir -p /mnt/{1,2,3}/{1,2,3}

```

```none
# find /mnt/ -links 2

```

```none
# find /mnt/ -links 1
/mnt/
/mnt/1
/mnt/1/1
/mnt/1/2
/mnt/1/3
/mnt/2
/mnt/2/1
/mnt/2/2
/mnt/2/3
/mnt/3
/mnt/3/1
/mnt/3/2
/mnt/3/3

```

The links counter has no meaning for directories on a BTRFS:

```none
# find /mnt/ -printf '%n %p\n'
1 /mnt/
1 /mnt/1
1 /mnt/1/1
1 /mnt/1/2
1 /mnt/1/3
1 /mnt/2
1 /mnt/2/1
1 /mnt/2/2
1 /mnt/2/3
1 /mnt/3
1 /mnt/3/1
1 /mnt/3/2
1 /mnt/3/3

```